package com.intelligentcar.springboot.controller;

import com.intelligentcar.springboot.bean.*;
import com.intelligentcar.springboot.service.ParameterServer;
import com.intelligentcar.springboot.service.TotalServer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;
import java.util.Map;

@Controller
public class TotalController {
    @Autowired
    private TotalServer totalServerImpl;

    @RequestMapping("/lineTotalList")
    @ResponseBody
    public Map<String,Object> lineTotalList(){
        return totalServerImpl.lineTotal();
    }

    @RequestMapping("/stationTotalList")
    @ResponseBody
    public Map<String,Object> stationTotalList(){
        return totalServerImpl.stationTotal();
    }

    @RequestMapping("/driverTotal")
    @ResponseBody
    public Map<String,Object> driverTotal(@RequestBody Driverattendance driverattendance){
        return totalServerImpl.driverTotal(driverattendance);
    }

    @RequestMapping("/staffTotal")
    @ResponseBody
    public Map<String,Object> staffTotal(@RequestBody StaffAttendance staffAttendance){
        return totalServerImpl.staffTotal(staffAttendance);
    }

    @RequestMapping("/topTotal")
    @ResponseBody
    public Map<String,Object> topTotal(@RequestBody DataPersonTest dataPersonTest){
        return totalServerImpl.topTotal(dataPersonTest);
    }

    @RequestMapping("/falutTotal")
    @ResponseBody
    public Map<String,Object> falutTotal(@RequestBody Falut falut){
        return totalServerImpl.falutTotal(falut);
    }

}
